{*
 * @author 		Zprofess <contact@zprofess.com>
 * @copyright  	2011 Zprofess
 * @version  	1.0 
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *}

<tr class="comparison_header">
	<td>
		{l s='Reviews' mod='reviewratingsynthesis'}
	</td>
	{section loop=$list_ids_product|count step=1 start=0 name=td}
		<td></td>
	{/section}
</tr>

{foreach from=$criteria item=criterion key=criterion_id}
<tr>		
	{cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'}
	<td class="{$classname}">
		{$criterion}
	</td>

	{foreach from=$list_ids_product item=id_product}
		{assign var='tab_grade' value=$product_grades[$criterion_id]}
		<td  width="{$width}%" class="{$classname} comparison_infos " align="center">
			{if isset($tab_grade[$id_product]) AND $tab_grade[$id_product]}
				<div class="displayAverageCompariosonZprofess_{$criterion_id}"></div>
				<script type="text/javascript">
					$(".displayAverageCompariosonZprofess_{$criterion_id}").raty({									
						width: 			{$configRating['width']},
						cancel: 		{$configRating['cancel']},						
						cancelHint:   	"{$configRating['cancelHint']}",  
						cancelOff:  	"{$configRating['cancelOff']}",
						cancelOn:   	"{$configRating['cancelOn']}", 	
						cancelPlace:  	"{$configRating['cancelPlace']}", 
					
						half:  			true,
						space:       	false,
						hintList:		{$configRating['hintList']},
						noRatedMsg:		"{$configRating['noRatedMsg']}",
						number:     	{$configRating['number']},
						path:           "{$configRating['path']}",	
						starHalf:		"{$configRating['starHalf']}",
						starOff:		"{$configRating['starOff']}",
						starOn:			"{$configRating['starOn']}",
						readOnly:		true,
						start: 			{$tab_grade[$id_product]},
					});
				</script>
			{else}
				-
			{/if}		
		</td>
	{/foreach}		
</tr>				
{/foreach}

{cycle values='comparison_feature_odd,comparison_feature_even' assign='classname'}
<tr>
	<td  class="{$classname} comparison_infos">{l s='Average' mod='reviewratingsynthesis'}</td>
	{foreach from=$list_ids_product item=id_product}
		<td  width="{$width}%" class="{$classname} comparison_infos" align="center" >
		{if isset($list_product_average[$id_product]) AND $list_product_average[$id_product]}
			<div class="displayAverageCompariosonZprofess"></div>
			<script type="text/javascript">
				$(".displayAverageCompariosonZprofess").raty({									
					width: 			{$configRating['width']},
					cancel: 		{$configRating['cancel']},						
					cancelHint:   	"{$configRating['cancelHint']}",  
					cancelOff:  	"{$configRating['cancelOff']}",
					cancelOn:   	"{$configRating['cancelOn']}", 	
					cancelPlace:  	"{$configRating['cancelPlace']}", 
				
					half:  			true,
					space:       	false,
					hintList:		{$configRating['hintList']},
					noRatedMsg:		"{$configRating['noRatedMsg']}",
					number:     	{$configRating['number']},
					path:           "{$configRating['path']}",	
					starHalf:		"{$configRating['starHalf']}",
					starOff:		"{$configRating['starOff']}",
					starOn:			"{$configRating['starOn']}",
					readOnly:		true,
					start: 			{$list_product_average[$id_product]},
				});
			</script>
		{else}
			-
		{/if}
		</td>	
	{/foreach}
</tr>